<%--
  Created by IntelliJ IDEA.
  User: Wang熊53
  Date: 2020/12/10
  Time: 16:50
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
<title>学生选择课程页面</title>

<link rel="stylesheet" href="layui/css/layui.css">
<script src="layui/layui.js"></script>
<link
	href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
	rel="stylesheet">
</head>
<body>
	<hr>
	<div class="container">
		<hr>
		<div class="row clearfix">
			<div class="col-md-12 column">
				<div class="page-header">
					<h1>
						<small>欢迎你，${realname}</small> <small style="float: right"><span>课程情况一览&nbsp;&nbsp;|&nbsp;&nbsp;<a
								id="close" href="${pageContext.request.contextPath}/close">退出登录</a></span></small>
					</h1>

				</div>
			</div>
		</div>

		<div class="row clearfix">
			<div class="col-md-12 column">
				<h2>
					<b>你可以选择的课程列表如下</b> <small style="float: right"><a
						id="already" href="${pageContext.request.contextPath}/already">查看已选课情况</a></small>
				</h2>
				<hr>
			</div>
		</div>

		<div class="row clearfix">
			<div class="layui-table">
				<table class="table table-hover table-striped">
					<colgroup>
						<col width="150">
						<col width="200">
						<col>
					</colgroup>
					<thead>
						<tr>
							<th>课程编号</th>
							<th>课程名称</th>
							<th>授课教师</th>
							<th>学分</th>
							<th>第一次上课时间</th>
							<th>第二次上课时间</th>
							<th>上课地点</th>
							<th>限选人数</th>
							<th>已选人数</th>
							<th>操作</th>
						</tr>
					</thead>

					<tbody>
						<c:forEach var="course" items="${list}">
							<tr>
								<td>${course.getCourseID()}</td>
								<td>${course.getCourseName()}</td>
								<td>${course.getTeacher()}</td>
								<td>${course.getPoint()}</td>
								<td>${course.getTime1()}</td>
								<td>${course.getTime2()}</td>
								<td>${course.getLocation()}</td>
								<td>${course.getLimited()}</td>
								<td>${course.getAlready()}</td>
								<td><a id="choice"
									href="${pageContext.request.contextPath}/choose?username=${username}&&realname=${realname}&&courseID=${course.getCourseID()}&&already=${course.getAlready()}">选课</a></td>
							</tr>
						</c:forEach>

					</tbody>
				</table>
			</div>
		</div>

	</div>
</body>
</html>
